//package com.xjrsoft.module.customerTwo.AppManage.service_support_order.stateMachine;
//
//
//import com.xjrsoft.module.customerTwo.AppManage.service_support_order.entity.ServiceSupportOrder;
//import org.springframework.messaging.Message;
//import org.springframework.statemachine.annotation.OnTransition;
//import org.springframework.statemachine.annotation.WithStateMachine;
//import org.springframework.stereotype.Component;
//
///**
// * @author by lisen
// * @Version 1.0.0
// * @Date 2024-04-24 12:29
// * @projectName: xjrsoft_new
// * @package: com.xjrsoft.module.customerTwo.AppManage.service_support_order.stateMachine
// * @className: ServiceSupportStateListener
// */
//
//@Component("ServiceSupportStateListener")
//@WithStateMachine(name = "ServiceSupportStateMachine")
//public class ServiceSupportStateListener {
//    @OnTransition(source = "TODO", target = "DONE")
//    public boolean handleTransition(Message<ServiceSupportEvents> message) {
//        ServiceSupportOrder order = (ServiceSupportOrder) message.getHeaders().get("order");
//        order.setState(ServiceSupportStates.DONE);
//        System.out.println("支付，状态机反馈信息：" + message.getHeaders());
//        return true;
//    }
//
//    @OnTransition(source = "DONE", target = "CLOSED")
//    public boolean confirmTransition(Message<ServiceSupportEvents> message) {
//        ServiceSupportOrder order = (ServiceSupportOrder) message.getHeaders().get("order");
//        order.setState(ServiceSupportStates.CLOSED);
//        System.out.println("发货，状态机反馈信息：" + message.getHeaders());
//        return true;
//    }
//
//}
